Repository navigation
fix(templates): update the Biome addon to Biome 2.6 - #1289
Conversation
Biome 2.6 renamed nursery.useSortedClasses to useTailwindSortedClasses and moved its function list to a top-level tailwind config. The Biome addon installs ^2.5.15, which now resolves to 2.6.2, so every new project with the addon got "Found an unknown key useSortedClasses", biome check exited with a configuration error and the editor extension failed to start. The config now matches what `biome migrate` produces for it, and the addon requires ^2.6.2. clsx and cn are merge functions and cva is a variant function, so class sorting still covers all three. Generated builds had no Biome sample, so this went unnoticed. Add tanstack-router and svelte samples with the addon, and a probe that runs `biome format --write .`, which fails when Biome can't load its config.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe Biome dependency version and addon rule configuration changed. Generated build samples now include TanStack Router and Svelte variants. After dependency installation, generated build tests run Biome formatting for samples with the Biome addon. ChangesBiome configuration and generated builds
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
70399950-d972-4841-a798-0a5be563173f
⛔ Files ignored due to path filters: 1
packages/template-generator/src/templates.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing: 5
apps/cli/test/generated-builds.test.tsapps/cli/test/generated-builds/probes.tsapps/cli/test/generated-builds/samples.tspackages/template-generator/src/utils/add-deps.tspackages/template-generator/templates/addons/biome/biome.json.hbs
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
Setting tailwind.mergeFunctions and variantFunctions replaces Biome's defaults, which already include clsx, cn and cva plus twMerge, twJoin, tw, tv and others. The explicit lists dropped class sorting for twMerge and tv, so remove them.
Summary
Every project created with
--addons biomeis broken right now. The addon installs@biomejs/biome@^2.5.15, which resolves to 2.6.2 (released 2026-10-21). Biome 2.6 rejects our config:biome checkfails, and the Biome editor extension doesn't start. This was found while verifying #809.Fix
Biome 2.6 renamed
nursery.useSortedClassestonursery.useTailwindSortedClassesand moved its function list to a top-leveltailwindsection. Biome's defaults there already cover ourclsx,cnandcva, plustwMerge,twJoin,tw,tvand others, so the template sets no list and uses the defaults:biome migrate --writeproduced the same rule rename. It also carried our old explicit function list over, which would have replaced Biome's wider defaults, so that part is left out. The addon now requires^2.6.2.Regression coverage
No generated-build sample used the Biome addon, so the daily run didn't catch this. This PR adds
tanstack-router-biomeandsvelte-biome(Svelte and Nuxt use the config'soverridesblock), plus a probe that runsbiome format --write .. That command exits non-zero only when Biome can't load its config.Verification
biome format --write .exit 1, and the new config exits 0.bun run checkresults match Biome 2.5.15 with the old config exactly, so the upgrade adds no new findings.cn(...),cva(...),twMerge(...)andtv(...)are all reported asuseTailwindSortedClasses.bun run checkis clean,test:cipasses 112 of 112, and the two new samples pass.Not in this PR
A fresh TanStack Router project still fails its own
bun run checkwith 4 errors on both Biome 2.5 and 2.6:input-group.tsxandlabel.tsxnoBannedTypesfor{}inpackages/api/src/context.tsThese existed before this PR. Svelte and Nuxt projects pass.
Summary by CodeRabbit
New Features
Bug Fixes